package com.wyp.mapper;

import com.wyp.pojo.Testpapers;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface TestpapersMapper {

    public int GetTestpapersCount();

    //返回所有试卷信息给前端页面
    public List<Map<String,Object>> qureyAllTestpapers();

    //查询试卷信息
    public List<Map<String,Object>> qureyTestpapersByTestpapername(String testpapername);
    public List<Map<String,Object>> qureyTestpapersByExampapername(String testpapername);
    public List<Map<String,Object>> qureyTestpapersByApartmentnameAccess(@Param("apartmentid") int apartmentid,@Param("testpapername") String testpapername);
    public List<Map<String,Object>> qureyTestpapersByApartmentname(int apartmentid);
    public List<Map<String,Object>> qureyTestpapersByAccess(int apartmentid);
    public Map<String,Object> qureyTestpapersByid(int id);
    public List<Map<String,Object>> qureyTestpapersExam();

    //组题
    public int addTestpapers(Testpapers testpapers);

    //更新试卷信息
    public int updateTestpapers(Testpapers testpapers);

    //删除试卷信息
    public int deleteTestpapers(Integer id);
}
